#include "../inc/ff_utils.h"

#include "utils_test.h"

#ifdef FF_UTILS_EN_CUDA
#ifdef FF_UTILS_EN_NVCC
#include "cuda_test.cuh"
#else
#include "cuda_test.h"
#endif
#endif
#ifdef FF_UTILS_EN_OCL
#include "ocl_test.h"
#endif
#ifdef FF_UTILS_EN_WINDOW
#include "window_test.h"
#endif
#ifdef FF_UTILS_EN_D3D
#include "window_test.h"
#include "d3d_test.h"
#endif

using namespace feifei;

#ifdef FF_UTILS_EN_D3D
D3DTest d3dTest;
void WindowRunFunc()
{
#ifdef FF_UTILS_EN_D3D
	d3dTest.Draw();
#endif
}
#endif

int main(int argc, char* argv[])
{
#ifdef FEIFEI_UTILS
	UtilsTest utils(argc, argv);
	utils.Test();
#endif
#ifdef FF_UTILS_EN_WINDOW
	WindowTest winTest(GetModuleHandleW(nullptr));
	winTest.Init();
#endif
#ifdef FF_UTILS_EN_D3D
	d3dTest.SetWindow(winTest.GetWinHandle(), winTest.GetWinWidth(), winTest.GetWinHeight());
	d3dTest.Init();
#endif
#ifdef FF_UTILS_EN_CUDA
	CudaUtilsTest cudaTest;
	cudaTest.Test();
#endif
#ifdef FF_UTILS_EN_OCL
	OclUtilsTest oclTest;
	oclTest.Test();
#endif
#ifdef FF_UTILS_EN_WINDOW
	winTest.SetRunFunc(WindowRunFunc);
	winTest.Run();
#endif

	return 0;
}

